<?php
/**
 * TOP API: alitrip.grouptour.product.upload request
 * 
 * @author auto create
 * @since 1.0, 2019.04.23
 */
class AlitripGrouptourProductUploadRequest
{
	/** 
	 * 新发布商品时必填。回程交通。1-飞机，2-火车，3-汽，4-船，100-其他
	 **/
	private $backTrafficType;
	
	/** 
	 * 可选，资源确认时长，当confirm_type=2时必填。1：2个工作小时内确认，2：6个工作小时内确认，3：9个工作小时内确认，4：18个工作小时内确认
	 **/
	private $confirmTime;
	
	/** 
	 * 可选，资源确认类型。1-即时确认，2-二次确认。不传默认1
	 **/
	private $confirmType;
	
	/** 
	 * PC端详情描述（新发布商品时，desc_xml和desc_html二者至少填写一个），Html格式。商家自定义Html格式描述。
	 **/
	private $descHtml;
	
	/** 
	 * PC端详情描述（新发布商品时，desc_xml和desc_html二者至少填写一个），xml格式：DESC根标签必须有，每一个亮点（HIGHLIGHT）支持1个title子标签，1个txt子标签和多个img子标签。
	 **/
	private $descXml;
	
	/** 
	 * 新发布商品时必填。出发地，多个出发地用英文逗号分隔。使用说明同“目的地”
	 **/
	private $fromLocations;
	
	/** 
	 * 新发布商品时必填。去程交通。1-飞机，2-火车，3-汽，4-船，100-其他
	 **/
	private $goTrafficType;
	
	/** 
	 * 套餐信息,数组类型，支持上传多个套餐信息
	 **/
	private $groupTourPackageInfo;
	
	/** 
	 * 必填，线路的“细分类型”属性：1-普通跟团游、2-半自由行、3-私家团；不填默认值设置为"1-普通跟团游"。
	 **/
	private $groupTourType;
	
	/** 
	 * 新发布商品时必填。是否出境游，0-不是，1-是。
	 **/
	private $isOverseasTour;
	
	/** 
	 * 可选，商家自定义标签（最多4个字，超长则自动截断，会进行违禁词校验）
	 **/
	private $itemCustomTag;
	
	/** 
	 * 可选，淘系商品id，用于将out_product_id关联到已经存在的商品，并且修改该商品外部商家编码为out_product_id。
	 **/
	private $itemId;
	
	/** 
	 * 必填，商家自定义商品编码。注：商品基本信息维护、价格库存维护，商品查询都以该编码为主键。
	 **/
	private $outProductId;
	
	/** 
	 * 0：使用上传的套餐信息（group_tour_package_info）覆盖商品上原有的套餐信息（此时group_tour_package_info中设置的packageOperation无效）；1：根据套餐信息（group_tour_package_info）中的packageOperation和outProductId增加，修改，删除指定套餐，====默认值为0===
	 **/
	private $packageOperation;
	
	/** 
	 * 新发布商品时必填。商品图片路径。最多支持5张，第一张为主图，必填，其余四张可选填。图片链接支持外链图片（即商家系统中图片链接，必须外网可访问，且格式为jpg或jpeg，大小在500k以内），或者用户淘宝空间内的图片链接。对于外链图片，将自动下载并上传用户淘宝图片空间，上传失败的外链图片将自动忽略不计。。注：在SDK中数组多个元素间以英文逗号分隔
	 **/
	private $picUrls;
	
	/** 
	 * 是否纯玩团。0-纯玩团，1-含购物团。新发布商品时不传默认为“含购物团”
	 **/
	private $purePlay;
	
	/** 
	 * （已废弃，建议使用refund_regulations_json）特殊可选，当refund_type=1或7时，需要上传自定义退改内容。自定义退改规则，最多可含5组规则，每组规则间以英文逗号分隔。 1）当refund_type为1时格式为：a_b_num,b-1_c_num。含义：提前a天至提前b天发起退款，买家需支付num比例违约费。 2）当refund_type为7时格式为：a_b_num1_num2_0,b-1_c_num1_num2_0。含义：提前a天至提前b天发起退款，买家需支付num1比例违约费，卖家需支付num2比例违约费，最后一个数字代表是否节假日规则（0-不是，1-是）。特别注意，当refund_type为7时，自定义退改规则必须设置 n天以上违约规则 以及 行程当日违约规则，即第一组规则需要以-1_a_num1_num2_0或-1_a_num1_num2_1开头，且最后一组规则需要以0_0_num1_num2_0或0_0_num1_num2_1结尾。
	 **/
	private $refundRegulations;
	
	/** 
	 * 特殊可选，退款规则（json数组格式）。自定义退改时需填写（与refund_regulations字段二选一）。示例中一共包含4条规则（3条平日规则，1条节假日规则），按照顺序每条规则含义如下：出行前5日及以上，买家违约收取总费用的50，卖家违约收取总费用的20；出行前4日至1日，买家违约收取总费用的80，卖家违约收取总费用的50；行程开始当天，买家违约收取总费用的100，卖家违约收取总费用的70；如果行程日期包含节假日，则节假日条款为买家违约收取总费用的100，卖家违约收取总费用的90
	 **/
	private $refundRegulationsJson;
	
	/** 
	 * 可选，退改规则类型。0-平台标准退改规则，1-自定义退改规则，2-不支持退改（已废弃，勿用），7-新版自定义退改规则。不传默认为0
	 **/
	private $refundType;
	
	/** 
	 * 可选，该商品提前预定时间限制。格式：1_18_00，含义：该商品必须提前1天预定，且在18:00之前完成预定
	 **/
	private $reserveLimit;
	
	/** 
	 * 参团线路类型。0 -目的地参团，1-为出发地参团
	 **/
	private $routeType;
	
	/** 
	 * 可选，减库存方式。0-拍下减库存。1-付款减库存。不传默认为0
	 **/
	private $subStock;
	
	/** 
	 * 可选，商品亮点，最多支持4个亮点。注：在SDK中数组多个元素间以英文逗号分隔
	 **/
	private $subTitles;
	
	/** 
	 * 新发布商品时必填。商品标题，30个中文字符以内
	 **/
	private $title;
	
	/** 
	 * 新发布商品时必填。目的地，多个目的地用英文逗号分隔。地址可以使用飞猪标准地址名称，也可以使用商家系统中目的地地址（支持商家目的地id和商家目的地名称）。如果需要使用商家目的地地址，必须在目的地关联页（https://sell.alitrip.com/icenter/main.htm#/widgets/api-adaptor?_k=n61ii0）配置映射关系（一次性批量上传建立映射关系，之后度假所有类目、API接口共用该映射关系）。 商家目的地地址使用示例1：东京,大阪。示例2：123,124。说明：商家目的地id（123,124）会根据映射关系自动转换成飞猪标准地址
	 **/
	private $toLocations;
	
	/** 
	 * 可选，出行人模板id。模板id需要商家以店铺账号身份登录飞猪商家工作台，从卖家工具->出行人管理中获取。注意：如果传0则代表设置为不需要出行人模板或使用飞猪平台默认的类目模板。
	 **/
	private $travellerTemplateId;
	
	/** 
	 * 新发布商品时必填。旅游天数。已废弃，以套餐维度行程天数为准。
	 **/
	private $tripDay;
	
	/** 
	 * 可选，旅游晚数，不传默认旅游天数-1。已废弃，以套餐维度行程晚数为准。
	 **/
	private $tripNight;
	
	/** 
	 * 可选，手机端详情描述，xml格式，格式详见示例。
	 **/
	private $wapDesc;
	
	private $apiParas = array();
	
	public function setBackTrafficType($backTrafficType)
	{
		$this->backTrafficType = $backTrafficType;
		$this->apiParas["back_traffic_type"] = $backTrafficType;
	}

	public function getBackTrafficType()
	{
		return $this->backTrafficType;
	}

	public function setConfirmTime($confirmTime)
	{
		$this->confirmTime = $confirmTime;
		$this->apiParas["confirm_time"] = $confirmTime;
	}

	public function getConfirmTime()
	{
		return $this->confirmTime;
	}

	public function setConfirmType($confirmType)
	{
		$this->confirmType = $confirmType;
		$this->apiParas["confirm_type"] = $confirmType;
	}

	public function getConfirmType()
	{
		return $this->confirmType;
	}

	public function setDescHtml($descHtml)
	{
		$this->descHtml = $descHtml;
		$this->apiParas["desc_html"] = $descHtml;
	}

	public function getDescHtml()
	{
		return $this->descHtml;
	}

	public function setDescXml($descXml)
	{
		$this->descXml = $descXml;
		$this->apiParas["desc_xml"] = $descXml;
	}

	public function getDescXml()
	{
		return $this->descXml;
	}

	public function setFromLocations($fromLocations)
	{
		$this->fromLocations = $fromLocations;
		$this->apiParas["from_locations"] = $fromLocations;
	}

	public function getFromLocations()
	{
		return $this->fromLocations;
	}

	public function setGoTrafficType($goTrafficType)
	{
		$this->goTrafficType = $goTrafficType;
		$this->apiParas["go_traffic_type"] = $goTrafficType;
	}

	public function getGoTrafficType()
	{
		return $this->goTrafficType;
	}

	public function setGroupTourPackageInfo($groupTourPackageInfo)
	{
		$this->groupTourPackageInfo = $groupTourPackageInfo;
		$this->apiParas["group_tour_package_info"] = $groupTourPackageInfo;
	}

	public function getGroupTourPackageInfo()
	{
		return $this->groupTourPackageInfo;
	}

	public function setGroupTourType($groupTourType)
	{
		$this->groupTourType = $groupTourType;
		$this->apiParas["group_tour_type"] = $groupTourType;
	}

	public function getGroupTourType()
	{
		return $this->groupTourType;
	}

	public function setIsOverseasTour($isOverseasTour)
	{
		$this->isOverseasTour = $isOverseasTour;
		$this->apiParas["is_overseas_tour"] = $isOverseasTour;
	}

	public function getIsOverseasTour()
	{
		return $this->isOverseasTour;
	}

	public function setItemCustomTag($itemCustomTag)
	{
		$this->itemCustomTag = $itemCustomTag;
		$this->apiParas["item_custom_tag"] = $itemCustomTag;
	}

	public function getItemCustomTag()
	{
		return $this->itemCustomTag;
	}

	public function setItemId($itemId)
	{
		$this->itemId = $itemId;
		$this->apiParas["item_id"] = $itemId;
	}

	public function getItemId()
	{
		return $this->itemId;
	}

	public function setOutProductId($outProductId)
	{
		$this->outProductId = $outProductId;
		$this->apiParas["out_product_id"] = $outProductId;
	}

	public function getOutProductId()
	{
		return $this->outProductId;
	}

	public function setPackageOperation($packageOperation)
	{
		$this->packageOperation = $packageOperation;
		$this->apiParas["package_operation"] = $packageOperation;
	}

	public function getPackageOperation()
	{
		return $this->packageOperation;
	}

	public function setPicUrls($picUrls)
	{
		$this->picUrls = $picUrls;
		$this->apiParas["pic_urls"] = $picUrls;
	}

	public function getPicUrls()
	{
		return $this->picUrls;
	}

	public function setPurePlay($purePlay)
	{
		$this->purePlay = $purePlay;
		$this->apiParas["pure_play"] = $purePlay;
	}

	public function getPurePlay()
	{
		return $this->purePlay;
	}

	public function setRefundRegulations($refundRegulations)
	{
		$this->refundRegulations = $refundRegulations;
		$this->apiParas["refund_regulations"] = $refundRegulations;
	}

	public function getRefundRegulations()
	{
		return $this->refundRegulations;
	}

	public function setRefundRegulationsJson($refundRegulationsJson)
	{
		$this->refundRegulationsJson = $refundRegulationsJson;
		$this->apiParas["refund_regulations_json"] = $refundRegulationsJson;
	}

	public function getRefundRegulationsJson()
	{
		return $this->refundRegulationsJson;
	}

	public function setRefundType($refundType)
	{
		$this->refundType = $refundType;
		$this->apiParas["refund_type"] = $refundType;
	}

	public function getRefundType()
	{
		return $this->refundType;
	}

	public function setReserveLimit($reserveLimit)
	{
		$this->reserveLimit = $reserveLimit;
		$this->apiParas["reserve_limit"] = $reserveLimit;
	}

	public function getReserveLimit()
	{
		return $this->reserveLimit;
	}

	public function setRouteType($routeType)
	{
		$this->routeType = $routeType;
		$this->apiParas["route_type"] = $routeType;
	}

	public function getRouteType()
	{
		return $this->routeType;
	}

	public function setSubStock($subStock)
	{
		$this->subStock = $subStock;
		$this->apiParas["sub_stock"] = $subStock;
	}

	public function getSubStock()
	{
		return $this->subStock;
	}

	public function setSubTitles($subTitles)
	{
		$this->subTitles = $subTitles;
		$this->apiParas["sub_titles"] = $subTitles;
	}

	public function getSubTitles()
	{
		return $this->subTitles;
	}

	public function setTitle($title)
	{
		$this->title = $title;
		$this->apiParas["title"] = $title;
	}

	public function getTitle()
	{
		return $this->title;
	}

	public function setToLocations($toLocations)
	{
		$this->toLocations = $toLocations;
		$this->apiParas["to_locations"] = $toLocations;
	}

	public function getToLocations()
	{
		return $this->toLocations;
	}

	public function setTravellerTemplateId($travellerTemplateId)
	{
		$this->travellerTemplateId = $travellerTemplateId;
		$this->apiParas["traveller_template_id"] = $travellerTemplateId;
	}

	public function getTravellerTemplateId()
	{
		return $this->travellerTemplateId;
	}

	public function setTripDay($tripDay)
	{
		$this->tripDay = $tripDay;
		$this->apiParas["trip_day"] = $tripDay;
	}

	public function getTripDay()
	{
		return $this->tripDay;
	}

	public function setTripNight($tripNight)
	{
		$this->tripNight = $tripNight;
		$this->apiParas["trip_night"] = $tripNight;
	}

	public function getTripNight()
	{
		return $this->tripNight;
	}

	public function setWapDesc($wapDesc)
	{
		$this->wapDesc = $wapDesc;
		$this->apiParas["wap_desc"] = $wapDesc;
	}

	public function getWapDesc()
	{
		return $this->wapDesc;
	}

	public function getApiMethodName()
	{
		return "alitrip.grouptour.product.upload";
	}
	
	public function getApiParas()
	{
		return $this->apiParas;
	}
	
	public function check()
	{
		
		RequestCheckUtil::checkMaxListSize($this->picUrls,20,"picUrls");
		RequestCheckUtil::checkMaxListSize($this->refundRegulations,20,"refundRegulations");
		RequestCheckUtil::checkMaxListSize($this->subTitles,20,"subTitles");
	}
	
	public function putOtherTextParam($key, $value) {
		$this->apiParas[$key] = $value;
		$this->$key = $value;
	}
}
